﻿@model HabitModel
@{
    ViewBag.Title = "生活习惯";
    Layout = "~/Views/Shared/_Layout.cshtml";

    var healthSet = ViewBag.HealthSet as SelectList;
    var smokeSet = ViewBag.SmokeSet as SelectList;
    var drinkSet = ViewBag.DrinkSet as SelectList;
    var lifeSet = ViewBag.LifeSet as SelectList;
    var exerciseSet = ViewBag.ExerciseSet as SelectList;

}
<section class="pe-basic">

    @Html.Partial("_PersonalPartial")
    <div class="content">
        <h4>生活习惯</h4>
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true)
            <div class="field">
                <div class="editor-label editor-label-half">
                    @Html.LabelFor(model => model.Health) @Html.ValidationMessageFor(model => model.Health)
                </div>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Smoke) @Html.ValidationMessageFor(model => model.Smoke)
                </div>
                <div class="editor-field editor-field-half">
                    @Html.DropDownListFor(model => model.Health, healthSet)
                    @Html.DropDownListFor(model => model.Smoke, smokeSet)
                </div>
            </div>
            <div class="field">
                <div class="editor-label editor-label-half">
                    @Html.LabelFor(model => model.Drink) @Html.ValidationMessageFor(model => model.Drink)
                </div>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Life) @Html.ValidationMessageFor(model => model.Life)
                </div>
                <div class="editor-field editor-field-half">
                    @Html.DropDownListFor(model => model.Drink, drinkSet)
                    @Html.DropDownListFor(model => model.Life, lifeSet)
                </div>
            </div>
        
            <div class="field">
                <div class="editor-label editor-label-half">
                    @Html.LabelFor(model => model.Exercise) @Html.ValidationMessageFor(model => model.Exercise)
                </div>
                <div class="editor-field editor-field-half">
                    @Html.DropDownListFor(model => model.Exercise, exerciseSet)

                </div>
            </div>
            <div class="field">
                <div class="editor-label">
                </div>
                <div class="editor-field">
                    <input type="submit" value="保存" />@Html.ActionLink("继续下一步", "Family")
                </div>
            </div>
        }
    </div>
</section>
